package com.hoshino.momochi.util;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

class FileMap {
    private List<String> errFiles = new ArrayList<>();

    private Map<String, String> succMap = new HashMap<>(); // file name:file url

    public FileMap(List<String> errFiles, Map<String, String> succMap) {
        this.errFiles = errFiles;
        this.succMap = succMap;
    }

    public List<String> getErrFiles() {
        return errFiles;
    }

    public void setErrFiles(List<String> errFiles) {
        this.errFiles = errFiles;
    }

    public Map<String, String> getSuccMap() {
        return succMap;
    }

    public void setSuccMap(Map<String, String> succMap) {
        this.succMap = succMap;
    }

    @Override
    public String toString() {
        return "FileMap{" +
                "errFiles=" + errFiles +
                ", succMap=" + succMap +
                '}';
    }
}

public class VditorResponse {
    private String msg;

    private Integer code;

    private FileMap data;

    public VditorResponse() {
    }

    public static VditorResponse success(List<String> errFiles, Map<String, String> succMap) {
        VditorResponse vditorResponse = new VditorResponse();
        vditorResponse.code = 1;
        vditorResponse.msg = "";
        vditorResponse.data = new FileMap(errFiles, succMap);
        return vditorResponse;
    }

    @Override
    public String toString() {
        return "VditorResponse{" +
                "msg='" + msg + '\'' +
                ", code=" + code +
                ", data=" + data +
                '}';
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public FileMap getData() {
        return data;
    }

    public void setData(FileMap data) {
        this.data = data;
    }
}
